<?php
namespace ImiApp\Module\Member\Model\Base;

use Imi\Model\Model as Model;
use Imi\Model\Annotation\DDL;
use Imi\Model\Annotation\Table;
use Imi\Model\Annotation\Column;
use Imi\Model\Annotation\Entity;

/**
 * 群管理 基类
 * @Entity
 * @Table(name="fa_group", id={"id"})
 * @DDL("CREATE TABLE `fa_group` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '群ID',
  `name` varchar(50) DEFAULT NULL COMMENT '群名',
  `description` varchar(255) DEFAULT NULL COMMENT '简介',
  `images` varchar(2555) DEFAULT NULL COMMENT '轮播图',
  `image` varchar(255) DEFAULT NULL COMMENT '群头像',
  `num` int(10) NOT NULL DEFAULT '99' COMMENT '可多少人加群',
  `uid` int(10) DEFAULT NULL COMMENT '创建人(群主)',
  `time` int(10) unsigned DEFAULT NULL COMMENT '创建时间',
  `status` enum('1','2','3') DEFAULT '1' COMMENT '状态:1=已关闭,2=开放中,3=禁止加入',
  `type_status` enum('1','2','3') DEFAULT '2' COMMENT '群类型:1=官方群,2=平台合伙人群,3=高级会员群',
  `have_num` int(10) unsigned DEFAULT '0' COMMENT '已加入人数',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='群管理'")
 * @property int $id 群ID
 * @property string $name 群名
 * @property string $description 简介
 * @property string $images 轮播图
 * @property string $image 群头像
 * @property int $num 可多少人加群
 * @property int $uid 创建人(群主)
 * @property int $time 创建时间
 * @property string $status 状态:1=已关闭,2=开放中,3=禁止加入
 * @property string $typeStatus 群类型:1=官方群,2=平台合伙人群,3=高级会员群
 * @property int $haveNum 已加入人数
 */
abstract class GroupBase extends Model
{
    /**
     * 群ID
     * id
     * @Column(name="id", type="int", length=10, accuracy=0, nullable=false, default="", isPrimaryKey=true, primaryKeyIndex=0, isAutoIncrement=true)
     * @var int
     */
    protected $id;

    /**
     * 获取 id - 群ID
     *
     * @return int
     */ 
    public function getId()
    {
        return $this->id;
    }

    /**
     * 赋值 id - 群ID
     * @param int $id id
     * @return static
     */ 
    public function setId($id)
    {
        $this->id = $id;
        return $this;
    }

    /**
     * 群名
     * name
     * @Column(name="name", type="varchar", length=50, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $name;

    /**
     * 获取 name - 群名
     *
     * @return string
     */ 
    public function getName()
    {
        return $this->name;
    }

    /**
     * 赋值 name - 群名
     * @param string $name name
     * @return static
     */ 
    public function setName($name)
    {
        $this->name = $name;
        return $this;
    }

    /**
     * 简介
     * description
     * @Column(name="description", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $description;

    /**
     * 获取 description - 简介
     *
     * @return string
     */ 
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * 赋值 description - 简介
     * @param string $description description
     * @return static
     */ 
    public function setDescription($description)
    {
        $this->description = $description;
        return $this;
    }

    /**
     * 轮播图
     * images
     * @Column(name="images", type="varchar", length=2555, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $images;

    /**
     * 获取 images - 轮播图
     *
     * @return string
     */ 
    public function getImages()
    {
        return $this->images;
    }

    /**
     * 赋值 images - 轮播图
     * @param string $images images
     * @return static
     */ 
    public function setImages($images)
    {
        $this->images = $images;
        return $this;
    }

    /**
     * 群头像
     * image
     * @Column(name="image", type="varchar", length=255, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $image;

    /**
     * 获取 image - 群头像
     *
     * @return string
     */ 
    public function getImage()
    {
        return $this->image;
    }

    /**
     * 赋值 image - 群头像
     * @param string $image image
     * @return static
     */ 
    public function setImage($image)
    {
        $this->image = $image;
        return $this;
    }

    /**
     * 可多少人加群
     * num
     * @Column(name="num", type="int", length=10, accuracy=0, nullable=false, default="99", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $num;

    /**
     * 获取 num - 可多少人加群
     *
     * @return int
     */ 
    public function getNum()
    {
        return $this->num;
    }

    /**
     * 赋值 num - 可多少人加群
     * @param int $num num
     * @return static
     */ 
    public function setNum($num)
    {
        $this->num = $num;
        return $this;
    }

    /**
     * 创建人(群主)
     * uid
     * @Column(name="uid", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $uid;

    /**
     * 获取 uid - 创建人(群主)
     *
     * @return int
     */ 
    public function getUid()
    {
        return $this->uid;
    }

    /**
     * 赋值 uid - 创建人(群主)
     * @param int $uid uid
     * @return static
     */ 
    public function setUid($uid)
    {
        $this->uid = $uid;
        return $this;
    }

    /**
     * 创建时间
     * time
     * @Column(name="time", type="int", length=10, accuracy=0, nullable=true, default="", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $time;

    /**
     * 获取 time - 创建时间
     *
     * @return int
     */ 
    public function getTime()
    {
        return $this->time;
    }

    /**
     * 赋值 time - 创建时间
     * @param int $time time
     * @return static
     */ 
    public function setTime($time)
    {
        $this->time = $time;
        return $this;
    }

    /**
     * 状态:1=已关闭,2=开放中,3=禁止加入
     * status
     * @Column(name="status", type="enum", length=0, accuracy=0, nullable=true, default="1", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $status;

    /**
     * 获取 status - 状态:1=已关闭,2=开放中,3=禁止加入
     *
     * @return string
     */ 
    public function getStatus()
    {
        return $this->status;
    }

    /**
     * 赋值 status - 状态:1=已关闭,2=开放中,3=禁止加入
     * @param string $status status
     * @return static
     */ 
    public function setStatus($status)
    {
        $this->status = $status;
        return $this;
    }

    /**
     * 群类型:1=官方群,2=平台合伙人群,3=高级会员群
     * type_status
     * @Column(name="type_status", type="enum", length=0, accuracy=0, nullable=true, default="2", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var string
     */
    protected $typeStatus;

    /**
     * 获取 typeStatus - 群类型:1=官方群,2=平台合伙人群,3=高级会员群
     *
     * @return string
     */ 
    public function getTypeStatus()
    {
        return $this->typeStatus;
    }

    /**
     * 赋值 typeStatus - 群类型:1=官方群,2=平台合伙人群,3=高级会员群
     * @param string $typeStatus type_status
     * @return static
     */ 
    public function setTypeStatus($typeStatus)
    {
        $this->typeStatus = $typeStatus;
        return $this;
    }

    /**
     * 已加入人数
     * have_num
     * @Column(name="have_num", type="int", length=10, accuracy=0, nullable=true, default="0", isPrimaryKey=false, primaryKeyIndex=-1, isAutoIncrement=false)
     * @var int
     */
    protected $haveNum;

    /**
     * 获取 haveNum - 已加入人数
     *
     * @return int
     */ 
    public function getHaveNum()
    {
        return $this->haveNum;
    }

    /**
     * 赋值 haveNum - 已加入人数
     * @param int $haveNum have_num
     * @return static
     */ 
    public function setHaveNum($haveNum)
    {
        $this->haveNum = $haveNum;
        return $this;
    }

}
